import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class PingPongGame extends JFrame {
    public PingPongGame() {
        initUI();
    }
    
    private void initUI() {
        add(new GamePanel());
        
        setTitle("乒乓球游戏");
        setSize(800, 600);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setLocationRelativeTo(null);
    }
    
    public static void main(String[] args) {
        EventQueue.invokeLater(() -> {
            var game = new PingPongGame();
            game.setVisible(true);
        });
    }
}    